<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@taglib  prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<style type="text/css">
		#rest,#select{
			background-color:#ff3f3f;
			border:1px solid #eed8ae;
			color:#ffffff;
			font-size:15px;
			width:50px;
			height:25px;
			border-radius:5px;
		}
		.main-div{
		width:950px;
		margin:0 auto;
		font-size:15px;
		border:1px solid #DBDBDB;
		}
		.main-div table tr div{
		height:40px;
		line-height: 40px;
		}
		.main-div table tr{
		width:950px;
		}
	</style>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<script type="text/javascript" src="../js/jquery-3.1.0.js"></script>
	<script type="text/javascript">
		var id,status,name,shippingstatus,moblie,orderstatus;
		$(function(){
			$("#select").click(function(){
				/* alert(id); */
				 id=$("input[name='orderid']").val(); 
				 name=$("input[name='consignne']").val();
				 mobile=$("input[name='mobile']").val();
				/*  email=$("input[name='email']").val(); */
				 if($("select[name='orderstatus']").val()=="-1"){
					 orderstatus="";
					}else{
						orderstatus=$("select[name='orderstatus']").val();
					}
				 if($("select[name='paystatus']").val()=="-1"){
						status="";
					}else{
						 status=$("select[name='paystatus']").val();
					}
				 if($("select[name='shippingstatus']").val()=="-1"){
					 shippingstatus="";
					}else{
						shippingstatus=$("select[name='shippingstatus']").val();
					}
				$.getJSON(
						"../OrdersServlet?method=findAllOrder", {
							pc:1,
							orderid:id,
							paystatus:status,
							consignne:name,
							mobile:mobile,
							orderstatus:orderstatus,
							shippingstatus:shippingstatus
							/* email:email; */
						},
						function(data) {
							if(data=="0")
								$("#rightdiv").load("findorder.jsp"); 
							});
			});
		});
	</script>
</head>
<body>
	<div style="width:100%; margin:0 auto;">
		<h3 style="margin-left:30px;margin-top:40px;margin-bottom: 60px;">查询订单</h3>
	<div class="main-div">
	  <table cellspacing="1" cellpadding="3" width="100%">
    <tr>
      <td><div align="right"><b>订单号：</b></div></td>
      <td colspan="4"><input name="orderid" type="text"  size="25"></td>
    </tr>
    <tr>
      <td><div align="right"><b>电子邮件：</b></div></td>
      <td colspan="4"><input name="email" type="text" id="email" size="25"></td>
    </tr>
    <tr>
     
      <td><div align="right"><b>支付方式：</b></div></td>
      <td><select name="payid" id="select5">
        <option value="0">请选择...</option>
                    </select></td>
      <td colspan="3"><div align="right"><b>收货人：</b></div></td>
      <td><input name="consignne" type="text"  size="20"></td>
    </tr>
    <tr>
      <td><div align="right"><b>配送方式：</b></div></td>
      <td><select name="shippingid" id="select4">
        <option value="0">请选择...</option>
                    </select></td>
      <td colspan="3"><div align="right"><b>手机：</b></div></td>
      <td><input name="mobile" type="text" id="mobile" size="20"></td>
    </tr>
    <tr>
      <td><div align="right"><b>订单状态：</b></div></td>
      <td colspan="4">
        <select name="orderstatus" >
          <option value="-1">请选择...</option>
          <option value="0">未确认</option><option value="1">已确认</option><option value="2"><font color="red"> 取消</font></option><option value="3"><font color="red">无效</font></option><option value="4"><font color="red">退货</font></option>     </select>
        <b>付款状态：</b>        <select name="paystatus" >
          <option value="-1">请选择...</option>
          <option value="0">未付款</option><option value="1">付款中</option><option value="2">已付款</option>        </select>
        <b>发货状态：</b>        <select name="shippingstatus" >
          <option value="-1">请选择...</option>
          <option value="0">未发货</option><option value="3">配货中</option><option value="1">已发货</option><option value="2">确认收货</option>       </select></td>
    </tr>
    <tr>
      <td colspan="7"><div align="center">
        <input name="query" type="submit" id="select" value=" 搜索 " />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <input name="reset" type="reset"  id="rest" value=' 重置 ' />
      </div></td>
      </tr>
  </table>
<!-- </form> -->
</div>
</div>
</body>
</html>